export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({
  sysCurd: {
    sysCurdList (data = {}, param = {}) {
      return request({
        url: '/curd/query/setup/page/search?sorts=id&direction=desc&page=' + (param.page - 1) + '&size=' + param.size,
        method: 'post',
        data: data
      })
    },
    sysCurdFindById (data) {
      return request({
        url: '/curd/query/setup/findById?id=' + data.id,
        method: 'get',
        data: data
      })
    },
    sysCurdUpdateById (data) {
      return request({
        url: '/curd/query/setup/update',
        method: 'post',
        data: data
      })
    },
    sysCurdInsert (data) {
      return request({
        url: '/curd/query/setup/insert',
        method: 'post',
        data: data
      })
    },
    sysCurdDeleteById (data) {
      return request({
        url: '/curd/query/setup/delete',
        method: 'post',
        data: data
      })
    },
    sysFormList (data = {}, param = {}) {
      return request({
        url: '/curd/form/setup/page/search?sorts=id&direction=desc&page=' + (param.page - 1) + '&size=' + param.size,
        method: 'post',
        data: data
      })
    },
    sysFormInsert (data) {
      return request({
        url: '/curd/form/setup/insert',
        method: 'post',
        data: data
      })
    },
    sysFormFindById (data) {
      return request({
        url: '/curd/form/setup/findById?id=' + data.id,
        method: 'get',
        data: data
      })
    },
    sysFormUpdateById (data) {
      return request({
        url: '/curd/form/setup/update',
        method: 'post',
        data: data
      })
    },
    sysFormDeleteById (data) {
      return request({
        url: '/curd/form/setup/delete',
        method: 'post',
        data: data
      })
    },
    testQuery (url, data) {
      return request({
        url: url,
        method: 'get',
        data: data
      })
    },
    sysEntityList (data = {}, param = {}) {
      return request({
        url: '/curd/entity/setup/page/search?sorts=id&direction=desc&page=' + (param.page - 1) + '&size=' + param.size,
        method: 'post',
        data: data
      })
    },
    sysEntityFindById (data) {
      return request({
        url: '/curd/entity/setup/findById?id=' + data.id,
        method: 'get',
        data: data
      })
    },
    sysEntityUpdateById (data) {
      return request({
        url: '/curd/entity/setup/update',
        method: 'post',
        data: data
      })
    },
    sysEntityDeleteById (data) {
      return request({
        url: '/curd/entity/setup/delete',
        method: 'post',
        data: data
      })
    },
    sysEntityInsert (data) {
      return request({
        url: '/curd/entity/setup/insert',
        method: 'post',
        data: data
      })
    },
    sysFieldEntityList (data = {}, param = {}) {
      return request({
        url: '/curd/entity/field/setup/page/search?sorts=seq&direction=asc&page=' + (param.page - 1) + '&size=' + param.size,
        method: 'post',
        data: data
      })
    },
    sysFieldEntityInsert (data) {
      return request({
        url: '/curd/entity/field/setup/insert',
        method: 'post',
        data: data
      })
    },
    sysFieldEntityUpdate (data) {
      return request({
        url: '/curd/entity/field/setup/update',
        method: 'post',
        data: data
      })
    },
    sysFieldEntityDeleteById (data) {
      return request({
        url: '/curd/entity/field/setup/delete',
        method: 'post',
        data: data
      })
    },
    sysFieldEntitySync (data) {
      return request({
        url: '/curd/entity/field/setup/sync?relEntityId=' + data.relEntityId,
        method: 'get',
        data: data
      })
    }
  }
})
